package lumingweihua.future.cn.lumingweihua.home.domain;

import android.text.TextUtils;

/**
 * Created by Administrator on 2018/3/5.
 */

public class CarData {
    private String id;
    private String car_id;
    private float sel_num;
    private String license;//车牌
    private String load;//吨数限量
    private boolean isSel;

    public CarData(String id, float sel_num, String car_num, String limit_weight, boolean isSel) {
        this.id = id;
        this.sel_num = sel_num;
        this.license = car_num;
        this.load = limit_weight;
        this.isSel = isSel;
    }

    public CarData() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public float getSel_num() {
        float w = 0;
        try {
            w = Float.valueOf(sel_num);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return w;
    }

    public void setSel_num(float sel_num) {
        this.sel_num = sel_num;
    }

    public String getCar_num() {
        if(TextUtils.isEmpty(license))
            return "暂无";
        return license;
    }

    public void setCar_num(String car_num) {
        this.license = car_num;
    }

    public int getLimit_weight() {
        int w = 0;
        try {
            w = Integer.valueOf(load);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return w;
    }

    public void setLimit_weight(String limit_weight) {
        this.load = limit_weight;
    }

    public boolean isSel() {
        return isSel;
    }

    public void setSel(boolean sel) {
        isSel = sel;
    }

    public String getCar_id() {
        return car_id;
    }

    public void setCar_id(String car_id) {
        this.car_id = car_id;
    }
}
